package com.onpositive.gamemaker.core;

public class CompositeSprite implements ISprite
{

	private final ISprite[] sprites;
	private final String id;
	
	public CompositeSprite(String id, ISprite... sprites)
	{
		this.id = id;
		this.sprites = sprites;
	}

	@Override
	public String getId()
	{
		return id;
	}

	@Override
	public void paint(int x, int y, int width, int height, GraphicDevice context)
	{
		for (int i = 0; i < sprites.length; i++)
		{
			sprites[i].paint(x,y,width,height,context);
		}
	}

}
